package com.jyb.util;

import java.util.ArrayList;
import java.util.List;

import com.jyb.enumeration.ShanghaiDistrict;
import com.jyb.util.capture.CqjhUtil;
import com.jyb.vo.CqjhMtVo;
import com.jyb.vo.CqjhShipVo;

public class CqjhMtUtil {

	private static List<CqjhMtVo> mtVos=new ArrayList<CqjhMtVo>();//船期计划码头
	
	public static List<CqjhMtVo> getMts(){
		return mtVos;
	}
	
	public static void updateCqjhMtVo(){
		List<CqjhMtVo> cqjhMtVos=new ArrayList<CqjhMtVo>();
		cqjhMtVos.add(new CqjhMtVo(ShanghaiDistrict.WY,CqjhUtil.getAllShips(ShanghaiDistrict.WY)));
		cqjhMtVos.add(new CqjhMtVo(ShanghaiDistrict.WE,CqjhUtil.getAllShips(ShanghaiDistrict.WE)));
		cqjhMtVos.add(new CqjhMtVo(ShanghaiDistrict.WS,CqjhUtil.getAllShips(ShanghaiDistrict.WS)));
		cqjhMtVos.add(new CqjhMtVo(ShanghaiDistrict.WW,CqjhUtil.getAllShips(ShanghaiDistrict.WW)));
		cqjhMtVos.add(new CqjhMtVo(ShanghaiDistrict.YY,CqjhUtil.getAllShips(ShanghaiDistrict.YY)));
		cqjhMtVos.add(new CqjhMtVo(ShanghaiDistrict.YS,CqjhUtil.getAllShips(ShanghaiDistrict.YS)));
		mtVos=cqjhMtVos;
		
	}
	
	public static List<CqjhShipVo> getCqjhShip(ShanghaiDistrict district){
		for (CqjhMtVo cqjhMtVo : mtVos) {
			if(cqjhMtVo.getShanghaiDistrict()==district){
				return cqjhMtVo.getShipVos();
			}
		}
		return new ArrayList<CqjhShipVo>();
	}
}
